#ifndef TESTTHREAD_H
#define TESTTHREAD_H

#include <QThread>
#include <QObject>
#include <QMutex>

struct AVFormatContext;
struct AVCodecContext;

class TestThread : public QThread
{
    Q_OBJECT
public:
    TestThread();
    ~TestThread();
    void exitThread();
    AVFormatContext *formatContext; // FFmpeg格式上下文
    AVCodecContext *codecContext;   // FFmpeg编解码器上下文
    int videoStreamIndex;           // 视频流索引

protected:
    void run();

signals:
    void frameReady(const QPixmap& pixmap);
};

#define TestThreadRelease Singleton<TestThread>::Release()
#define TestThreadInstance Singleton<TestThread>::GetInstance()


#endif // TESTTHREAD_H
